# Define a class named "Station", Inherit Parent Class "Element".
from District import district

# 水库。调用父类初始化参数，并增加额外参数
class station:
	def __init__(
			self,
			id: str = None,
			name: str = None,
			t: int = None,
			distance_to_root: float = None,
			outflow_max: float = None,
			outflow_min: float = None,
			level_min: float = None,
			delta_t: float = None,
			# river: river = None,
			district: district = None,
			capacity: float = None,
			time_beans: list = [],
			# upper: list = None,
			# down: list = None,
			# upper_station: list = None,
			# first: bool = False,
			end: bool = False,
			level_max: float = False,
			level_flood: float = None,
			v_max: float = None,
			v_flood: float = None,
			v_min: float = None,
			storage_coefficient: float = None,
			districts: list = []):
		self.id = id  # id
		self.name = name  # 名称
		self.t = t  # 时间段
		self.distance_to_root = distance_to_root  # 离河口的距离
		self.outflow_max = outflow_max  # 最大流量
		self.outflow_min = outflow_min  # 最小流量
		self.level_min = level_min  # 最小水位
		self.delta_t = delta_t  # 与最上游的滞时
		# self.river = river #所属河道,river类实例
		self.district = district  # 所属区域，district类的一个实例
		self.capacity = capacity  # 取水输水能力
		self.time_beans = time_beans  # 长系列来水调算结果
		# self.upper = upper  # 上游的水库或取水口，element类的列表
		# self.down = down  # 下游的水库或取水口，element类的列表
		# self.upper_station = upper_station  # 上游的水库，Station类的实例列表
		# self.first = first  # 是否为河流上第一个元素 True/False
		self.end = end  # 是否为河流上最后一个元素 同上
		self.level_max = level_max  # 正常高水位 sql里有 每个水库的属性数据填入
		self.level_flood = level_flood  # 防洪限制水位
		self.v_max = v_max  # 正常高水位对应库容
		self.v_flood = v_flood  # 正常高水位对应库容
		self.v_min = v_min  # 死水位对应库容
		self.storage_coefficient = storage_coefficient  # 库容系数
		self.districts = districts  # 供水区域


	
	def getLevelMax(self):
		return self.level_max
	
	def setLevelMax(self, level_max):
		self.level_max = level_max
	
	def getLevelFlood(self):
		return self.level_flood
	
	def setLevelFlood(self, level_flood):
		self.level_flood = level_flood
	
	def getvMax(self):
		return self.v_max
	
	def setvMax(self, v_max):
		self.v_max = v_max
	
	def getvFlood(self):
		return self.v_flood
	
	def setvlvFlood(self, v_flood):
		self.v_flood = v_flood
	
	def getvMin(self):
		return self.v_min
	
	def setvMin(self, v_min):
		self.v_min = v_min
	
	def getStorageCoefficient(self):
		return self.storage_coefficient
	
	def setStorageCoefficient(self, storage_coefficient):
		self.storage_coefficient = storage_coefficient
	
	def getDistricts(self):
		return self.districts
	
	def setDistricts(self, districts):
		self.districts = districts

	def getId(self):
		return self.id

	def setId(self, id: str = None):
		self.id = id

	def getName(self):
		return self.name

	def setName(self, name: str = None):
		self.name = name

	def getT(self):
		return self.t

	def setT(self, t: int = None):
		self.t = t

	def getDistanceToRoot(self):
		return self.distance_to_root

	def setDistanceToRoot(self, distance_to_root: float = None):
		self.distance_to_root = distance_to_root

	def getOutflowMax(self):
		return self.outflow_max

	def setOutflowMax(self, outflow_max: float = None):
		self.outflow_max = outflow_max

	def getOutflowMin(self):
		return self.outflow_min

	def setOutflowMin(self, outflow_min: float = None):
		self.outflow_min = outflow_min

	def getLevelMin(self):
		return self.level_min

	def setLevelMin(self, level_min: float = None):
		self.level_min = level_min

	def getDeltaT(self):
		return self.delta_t

	def setDeltaT(self, delta_t: float = None):
		self.delta_t = delta_t

	# def getRiver(self):
	# 	return self.river
    #
	# def setRiver(self, river: river = None ):
	# 	self.river = river

	def getDistrict(self):
		return self.district

	def setDistrict(self, district: district = None):
		self.district = district

	def getCapacity(self):
		return self.capacity

	def setCapacity(self, capacity: float = None):
		self.capacity = capacity

	def getTimeBeans(self):
		return self.time_beans

	def setTimeBeans(self, time_beans: list = None):
		self.time_beans = time_beans

	# def getUpper(self):
	# 	return self.upper
    #
	# def setUpper(self, upper: list = None):
	# 	self.upper = upper
    #
	# def getDown(self):
	# 	return self.down
    #
	# def setDown(self, down: list = None):
	# 	self.down = down
    #
	# def getUpperStation(self):
	# 	return self.upper_station
    #
	# def setUpperStation(self, upper_station: list = None):
	# 	self.upper_station = upper_station
    #
	# def getFirst(self):
	# 	return self.first
    #
	# def setFirst(self, first: bool = False):
	# 	self.first = first
    #
	def getEnd(self):
	    return self.end
    #
	def setEnd(self, end: bool = False):
	 	self.end = end